<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>词多多代理商平台</title>
    <include file="Index:header" />
    <script type="text/javascript">
        $(function(){
            $(".help-side dl dd:eq(0)").addClass('cur');
        })
    </script>
    <script type="text/javascript">
        $(function(){
            $("#top #topcon .nav li:eq(1)").addClass('cur');
        })
    </script>
    <script src="__PUBLIC__/js/main.js" type="text/javascript" charset="UTF-8"></script>
</head>
<body>
<include file="Index:top"/>
<div id="main">
    <include file="User:left"/>
    <div id="main_right" class="container">
        <div class="title">基本资料<button class="button_s green" style="float:right;margin-top:5px; padding:1px 10px"
                                       onclick="window.history.go(-1)">返回</button></div>
        <div id="home_user">
            <div id="userface">
                <div><img src="__PUBLIC__/images/userface.gif" alt="" /></div>
                <if condition="$userInfo['Usertype'] eq 1">
                <div align="center" style="margin-top:3px;color:#FF7902;">精准词客户</div>
                <else/> <div align="center" style="margin-top:3px;color:#FF7902;">主词客户</div>
            </if>
            </div>
            <div>
               <table  border=1 bordercolor=#e7e7e7 cellpadding=10 style="margin-top:10px;width:80%;">
                    <tr>
                        <td align="center">客户名称</td>
                        <td align="center">{$userInfo['Username']}</td>
                        <td align="center">代理商名称</td>
                        <td align="center">{$agentName}</td>
                    </tr>
                    <tr>
                        <td align="center">真实姓名</td>
                        <td align="center">{$userInfo['Realname']}</td>
                        <td align="center">公司名称</td>
                        <td align="center">{$userInfo['Company']}</td>

                    </tr>
                    <tr>
                        <td align="center">手机号码</td>
                        <td align="center">{$userInfo['Mobile']}</td>
                        <td align="center">电子邮箱</td>
                        <td align="center">{$userInfo['Email']}</td>
                    </tr>
                   <tr>
                       <td align="center">客户状态</td>
                       <if condition="$userInfo['Active'] eq 0"><td align="center">关闭</td>
                           <else/><td align="center">开启</td>
                       </if>
                       <td align="center">注册时间</td>
                       <td align="center">{$userInfo['Regtime']}</td>
                   </tr>
                </table>
            </div>
        </div>

        <div class="title c mt10">客户概况</div>
        <div id="home_info" class="mt10 ">
            <table border=1 bordercolor=#e7e7e7 cellpadding=3 cellspacing=0 width=100% align="center">
                <tr  align="center">
                    <td colspan='4' align='center' bgcolor="#F6F7F6">客户概况统计</td>
                </tr>
                <tr  align="center">
                    <td >账户余额</td>
                    <td>{$userInfo['Usermoney']}</td>
                    <td >预计使用天数</td>
                    <if condition="$money['usenum'] eq 0"><td style="color:#FF7902;">天</td>
                        <else/><td style="color:#FF7902;">{$money['usenum']}天</td>
                    </if>

                </tr>
                <tr  align="center">
                    <td >累计消费</td>
                    <if condition="$money['total'] eq 0"><td>0</td>
                        <else/><td>{$money['total']}</td>
                    </if>
                    <td >平均消费</td>
                    <if condition="$money['avg'] eq 0"><td>0</td>
                        <else/><td>{$money['avg']}</td>
                    </if>
                </tr>
                <tr  align="center">
                    <td >站点数量</td>
                    <td>{$money['sitenum']}</td>
                    <td >关键词数量</td>
                    <td>{$money['wordnum']}</td>
                </tr>
                <tr  align="center">
                    <td >客户类型</td>
                    <if condition="$userInfo['Usertype'] eq 1">
                        <td>精准词客户</td>
                        <else/> <td>主词客户</td>
                    </if>
                    <td align="center">客户状态</td>
                    <if condition="$userInfo['Active'] eq 0"><td align="center">停用</td>
                        <else/><td align="center">开启</td>
                    </if>
                </tr>
            </table>
        </div>
        <div class="title c mt10">近期计费合计走势图</div>
        <div id="charts"></div>
    </div>
</div>
<include file="Index:footer"/>
<script type="text/javascript">
    $(function() {
        $('#charts').highcharts({
            chart: {
                type: 'spline',
                height: 310
            },
            title: {
                text: '近30天计费合计走势图'
            },
            xAxis: {
                categories: [{$category}]
            },
            yAxis: {
                title: {
                    text: '合计费用（元）'
                },
                labels: {
                    formatter: function() {
                        return this.value + '元'
                    }
                }
            },
            tooltip: {
                crosshairs: true,
                shared: true
            },
            plotOptions: {
                spline: {
                    events: {
                        click: function(e) {
                            art.dialog.open("/index.php/User/userdayxf/userId/{$userId}/days/" + e.point.days, {
                                title: "消费明细",
                                width:"50%",
                                height:"40%",
                                lock: true
                            });
                        }
                    },
                    marker: {
                        radius: 4,
                        lineColor: '#666666',
                        lineWidth: 1
                    }
                }
            },
            series: [{
                name: '计费合计',
                marker: {
                    symbol: 'square'
                },
                data: [{$showdatas}]

            }]
        });
    });
</script>
</body>
</html>